package com.springcloudserver.config;

import com.springcloudserver.common.AjaxResult;
import com.springcloudserver.service.UserInfoService;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @description:
 * @author: chenzuolin
 * @time: 2021/3/22 21:32
 */
@Component
public class UserInfoFeignFactory implements FallbackFactory<UserInfoService> {
    @Override
    public UserInfoService create(Throwable throwable) {
        return new UserInfoService() {
            @Override
            public AjaxResult findById(String id) {
                return null;
            }

            @Override
            public AjaxResult findAll() {
                return null;
            }
        };
    }
}
